/**
 * 
 */
package com.study.facade;

import java.util.HashMap;
import java.util.Map;

import org.apache.catalina.core.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author Administrator
 * @date 2019年6月23日
 */
public class Main {

	public static void main(String[] args) {
		
		AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(BeanConfig.class);
		
		PayCallbackService payCallbackService = (PayCallbackService) context.getBean("payCallbackService");
		PayCallbackFacade payCallbackFacade = (PayCallbackFacade) context.getBean("payCallbackFacade");
		Map<String, String> verifySignature = new HashMap<String,String>();
		verifySignature.put("orderId","xiaoming");
		verifySignature.put("respCode","0");
		payCallbackService.callback(verifySignature );
		
		//外观模式
		payCallbackFacade.callback(verifySignature);
	}
}
